import requests

# url_add = "http://ihrm2-test.itheima.net/api/sys/user"
#
# # 添加员工
# resp = requests.post(url=url_add,
#                      headers={"Content-Type":"application/json","Authorization":"Bearer df2d74b0-a560-43e3-8c8b-53cef037d1b0"},
#                      json={"username":"kity","mobile":"15036422287","workNumber":"0008"})
# print(resp.json())
# # 员工管理列表
# resp1 = requests.get(url="http://ihrm2-test.itheima.net/api/sys/user?page=1&size=10000",
#              headers={"Content-Type":"application/json","Authorization":"Bearer df2d74b0-a560-43e3-8c8b-53cef037d1b0"})
# print(resp1.json())
# # 查询员工  1829771111487795200
# resp2 = requests.get(url="http://ihrm2-test.itheima.net/api/sys/user/1829771111487795200",
#             headers={"Content-Type":"application/json","Authorization":"Bearer df2d74b0-a560-43e3-8c8b-53cef037d1b0"})
# print(resp2.json())
# # 修改员工
# resp3=requests.put(url="http://ihrm2-test.itheima.net/api/sys/user/1829771111487795200",
#             headers={"Content-Type":"application/json","Authorization":"Bearer df2d74b0-a560-43e3-8c8b-53cef037d1b0"},
#              json={"password":"123456"})
# print(resp3.json())
# 删除员工
resp4 = requests.delete(url="http://ihrm2-test.itheima.net/api/sys/user/1829771111487795200",
            headers={"Content-Type":"application/json","Authorization":"Bearer df2d74b0-a560-43e3-8c8b-53cef037d1b0"})
print(resp4.json())